Repository navigation
refactor(deliver): one delivery function per host - #74
Merged
Merged
Conversation
send, dm, ocs notices and the LAN daemon each had their own copy of the Claude, Pi, Hermes, OpenCode and Grok wake + reporting code. Each host now has a single deliverTo<Host> in deliver.ts (Codex already had deliverToCodexTask); entry points only resolve addresses. Parallel Claude wakes in send buffer their output and flush in target order instead of reporting twice. Small wording alignment on the notice path: a Pi notice with an unknown outcome uses the unknown-outcome line, and an OpenCode notice failure includes its detail, as dm already did.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 36 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure refactor, no protocol change.
Before:
cmdSendinlined Pi and Hermes wakes,deliverDmhad its own Claude/Pi/Hermes/OpenCode/Grok branches, anddeliverNoticea third copy — the same wake + wording + exit-code logic written up to three times per host (adding the Claude channel in #71 meant touching four places).After: each host has one
deliverTo<Host>insrc/deliver.ts(deliverToClaude,deliverToPi,deliverToHermes,deliverToOpenCode,deliverToGrok, plus the existingdeliverToCodexTask). Entry points only resolve addresses and call them. Every host's wake primitive now has exactly one call site. Parallel Claude wakes insenduse abufferedSinkand flush in target order instead of reporting each result twice.Behaviour notes (notice path only): a Pi notice with an unknown outcome now prints the unknown-outcome line (exit semantics unchanged), and an OpenCode notice failure includes its detail — both now match
dm.Verification: tsc clean; full suite same as main (only the 4 environment-specific local failures); new
test/deliver.test.tsfor buffered ordering. No CHANGELOG entry, so merging does not cut a release.